//
//  IslanSearchHead.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/3/8.
//  Copyright © 2016年 game. All rights reserved.
//

#import "IslanSearchHead.h"

@interface IslanSearchHead ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lihight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *textWidth;

@property (nonatomic,strong) UIView *leftView;

@end

@implementation IslanSearchHead
-(void)awakeFromNib{
    
    self.lihight.constant = 0.5;

    self.textWidth.constant =SCREEN_WIDTH-70;
    self.textField.leftView = [self textFileLweftView];
    self.textField.leftViewMode=UITextFieldViewModeAlways;
    
    [self.textField becomeFirstResponder];
}

/**
 *  textFile左边视图  放大镜
 */
-(UIView *)textFileLweftView{
    UIView *bacView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 30, 30)];
        
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"btn-search-grey"]];
    imageView.frame = CGRectMake(8,5,W(bacView)-10,W(bacView)-10);
    [bacView addSubview:imageView];
    
    return bacView;
}


@end
